package com.mjk.common.tools.aop;


import com.mjk.common.util.ReflectionUtils;
import lombok.Data;
import org.aspectj.lang.JoinPoint;

import java.lang.reflect.Method;

public  class BaseAop {	
		
	
	public BaseAopModel getPointInfo(JoinPoint point){
		Object target = point.getTarget();
		String methodName = point.getSignature().getName();		
		Method m = ReflectionUtils.getMethodByName(target.getClass(), methodName);
		BaseAopModel model = new BaseAopModel();
		model.setTarget(target);model.setMethod(m);
		return model;
	}
	
	@Data
	public static class BaseAopModel{
		private Object target;
		
		private Method method;

	}
}
